public bool AddNewThread(Thread newThread) { using (var entities = new MyBase.Infrastructure.Data.Model.MyBaseProjEntities()) { entities.Threads.Add(newThread); return((entities.SaveChanges() != 0) ? true : false); } }
public int CreateUserDetails(User user) { using (var entities = new MyBase.Infrastructure.Data.Model.MyBaseProjEntities()) { entities.Users.Add(user); return(entities.SaveChanges()); } }