public IStatusGeneric AddProjectToperson(Guid projectId) { var status = new StatusGenericHandler(); this.ProjectLink.Add(PersonProject.CreatepersonContractor(0, projectId).Result); return(status); }
public static IStatusGeneric <Person> CreatePerson(string firstName, string lastName , string nationalId, string mobileNumber, Guid[] projectIds) { var status = new StatusGenericHandler <Person>(); var person = new Person { FirstName = firstName, LastName = lastName, NationalId = nationalId, MobileNumber = mobileNumber }; foreach (var ids in projectIds) { person.ProjectLink.Add(PersonProject.CreatepersonContractor(0, ids).Result); } status.Result = person; return(status); }