private void detach_CUsers(CUser entity) { this.SendPropertyChanging(); entity.Company = null; }
private void attach_CUsers(CUser entity) { this.SendPropertyChanging(); entity.Company = this; }
partial void DeleteCUser(CUser instance);
partial void UpdateCUser(CUser instance);
partial void InsertCUser(CUser instance);
public void CreateCUserToCompany_By_Guid(string cusername, Guid userID, int forced) { int companyIDfound = (from c in db.Companies where c.UserID == userID select c.CompanyID).Single(); CUser cuser = new CUser { CompanyID = companyIDfound, Date = DateTime.Now, Forced = forced, TotalIn = 0, TotalInDiscounted = 0, UserCode = cusername }; db.CUsers.InsertOnSubmit(cuser); db.SubmitChanges(); }