public async Task <bool> UpdateUser(FMPCustomFields User) { var result = await _updatecustomfields.Handle( UpdateCustomFieldsCommand .WithFilter(CustomFieldsFilter .UserName(User.UserName) ) .SetExistingColumns(User) ); return(result); }
public static CustomFieldsFilter UserName(string userName) { var obj = new CustomFieldsFilter(); var filter1 = obj.FilterBuilder.Where( f => f.UserName == userName ); obj.Filters.Add(filter1); return(obj); }
public async Task <User> GetUserById(string UserId) { var data = await _customfields.Handle( CustomFieldsFilter.UserName(UserId) ); if (data.Count() > 0) { return(data.ToList()[0]); } return(null); }
public async Task <bool> createUser(FMPCustomFields saveCustomColumnRequestData) { var Isexist = await _customFieldsExists.Handle( CustomFieldsFilter.UserName(saveCustomColumnRequestData.UserName) ); if (Isexist) { return(false); } else { var customFieldsData = FMPCustomFields.From( saveCustomColumnRequestData); await _createCustomFields.Handle( CreateCommand <FMPCustomFields> .From(customFieldsData)); } return(true); }