Guest User

Untitled

a guest
Feb 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.46 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.         public UserService(IRepository repository)
  13.         {
  14.  
  15.         }
  16.  
  17.         private readonly SupplierManualEntities context = new SupplierManualEntities(ConfigurationManager.ConnectionStrings["SupplierManualEntities"].ConnectionString);
  18.  
  19.         public aspnet_User AddUser()
  20.         {
  21.             throw new NotImplementedException();
  22.         }
  23.  
  24.         public aspnet_User GetUser()
  25.         {
  26.             throw new NotImplementedException();
  27.         }
  28.  
  29.         public aspnet_User UpdateUser()
  30.         {
  31.             throw new NotImplementedException();
  32.         }
  33.  
  34.         public void DeleteUser()
  35.         {
  36.             throw new NotImplementedException();
  37.         }
  38.  
  39.         public IQueryable<aspnet_User> GetSuppliers()
  40.         {
  41.             IQueryable<aspnet_User> suppliers = context.aspnet_User.Where(p => !String.IsNullOrEmpty(p.SupplierName))
  42.              .Select(p => p);
  43.             return suppliers;
  44.         }
  45.  
  46.         public IQueryable<aspnet_User> GetAdministrators()
  47.         {
  48.             IQueryable<aspnet_User> administrators = context.aspnet_User.Where(p => String.IsNullOrEmpty(p.SupplierName))
  49.             .Select(p => p);
  50.             return administrators;
  51.         }
  52.     }
  53. }
Add Comment
Please, Sign In to add comment