Guest User

Untitled

a guest
Feb 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.54 KB | None | 0 0
  1. using System;
  2. using System.Data.Objects;
  3. using System.Linq;
  4. using SupplierManual.Data;
  5. using SupplierManual.Services.Interfaces;
  6. using System.Configuration;
  7.  
  8. namespace SupplierManual.Services
  9. {
  10.     public class UserService : IUserService
  11.     {
  12.         private IRepository repositry;
  13.  
  14.         public UserService(IRepository repository)
  15.         {
  16.             this.repositry = repository;
  17.         }
  18.  
  19.         private readonly SupplierManualEntities context = new SupplierManualEntities(ConfigurationManager.ConnectionStrings["SupplierManualEntities"].ConnectionString);
  20.  
  21.         public aspnet_User AddUser()
  22.         {
  23.             throw new NotImplementedException();
  24.         }
  25.  
  26.         public aspnet_User GetUser()
  27.         {
  28.             throw new NotImplementedException();
  29.         }
  30.  
  31.         public aspnet_User UpdateUser()
  32.         {
  33.             throw new NotImplementedException();
  34.         }
  35.  
  36.         public void DeleteUser()
  37.         {
  38.             throw new NotImplementedException();
  39.         }
  40.  
  41.         public IQueryable<aspnet_User> GetSuppliers()
  42.         {
  43.             IQueryable<aspnet_User> suppliers = context.aspnet_User.Where(p => !String.IsNullOrEmpty(p.SupplierName))
  44.              .Select(p => p);
  45.             return suppliers;
  46.         }
  47.  
  48.         public IQueryable<aspnet_User> GetAdministrators()
  49.         {
  50.             IQueryable<aspnet_User> administrators = context.aspnet_User.Where(p => String.IsNullOrEmpty(p.SupplierName))
  51.             .Select(p => p);
  52.             return administrators;
  53.         }
  54.     }
  55. }
Add Comment
Please, Sign In to add comment